package com.wisdom.client.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @description: <client 对于rpc服务的发现配置>
 * @author: Leo
 * @date: 2021-08-22 16:33
 */
@Configuration
@Data
public class ClientRpcConfig {

    //服务ip/域名
    @Value("${rpc.client.serverIp}")
    private String serverIp;

    //服务端口
    @Value("${rpc.client.serverPort}")
    private int serverPort;

    //服务权重
    @Value("${rpc.client.nacos.weight:1.0}")
    private double weight;

    //集群名称
    @Value("${rpc.client.nacos.clusterNames:null}")
    private String clusterNames;

    @Value("${rpc.client.nacos.timeout:100}")
    private int connectTimeout;

    @Value("${rpc.client.nacos.serverAdd}")
    private String serverAdd;

    @Value("${rpc.client.nacos.groupName:WISDOM-RPC}")
    private String groupName;

    @Value("${rpc.cluster.strategy:polling}")
    private String strategy;
}
